package store;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/employees")
public class EmployeeController {

	@Autowired
	EmployeeDAO dao;

	@RequestMapping
	public ModelAndView getAllEmployees() {
		EmployeeList el = new EmployeeList();
		el.setStudents(dao.getAllEmployees());

		return new ModelAndView("employees", "employees", el);
	}

}
